var log = console.log;

setImmediate(() => {
    log(1);
});

log(2);

process.nextTick(() => {
    log(3);
});

log(4);

// out： 2 4 3 1
// process.nextTick 比 setImmediate 的回调早被执行。

return;

var a = ' [pid:6092] [2017-6-29 14:38:31.870] [INFO] url - ::ffff:192.168.72.252 GET http://192.168.72.252:3000/user/add/lsw/25';

var reg = /\[[a-zA-Z0-9\s-:.]*\]/g;

console.log(a.match(reg));  // [ '[pid:6092]', '[2017-6-29 14:38:31.870]', '[INFO]' ]

var conf = {
    id: "rs0",  // 副本集的名称
    members: [
        {
            _id: 0,
            host: "192.168.1.100:27017"  // 可以是相同的机器不同的端口，或者不同的机器，相同或不同的端口
        },
        {
            _id: 1,
            host: "192.168.1.100:27018"
        },
        {
            _id: 2,
            host: "192.168.1.100:27019"
        }
    ]
}